/*
 * pcf8563.h
 *
 *  Created on: Oct 27, 2016
 *      Author: duan
 */

#ifndef SRC_PCF8563_H_
#define SRC_PCF8563_H_

#include "xil_types.h"
#include "regs.h"

typedef struct{
    void (* write_byte)(unsigned short addr, unsigned char dat);
    unsigned char (* read_byte)(unsigned short addr);
} PCF8563_IIC;

static u8 rtc_read_byte(u16 addr);
static void rtc_write_byte(u16 addr, u8 data);

void set_rtc_remote_time(u8 Timestamp[6]);
void get_rtc_remote_time(u8 Timestamp[6]);

extern PCF8563_IIC pcf8563;

#endif /* SRC_PCF8563_H_ */
